Roll : A Language for Specifying Die-Rolls

نویسنده

  • Torben Æ. Mogensen
چکیده

Role-playing games (RPG’s) use a variety of methods for rolling dice to add randomness to the game. In the simplest form, a small number of identical dice are rolled and added, but more advanced forms involve cumulative re-rolling of 6’s, doubling the value of doubles, removing the lowest or highest result or counting the number of dice that are below a threshold, and many other weird and wonderful modifications. While die-roll programs and net-based die-roll servers exist, they can usually only handle the simplest form of die-rolls. This paper describes Roll, a simple functional language for defining how dice are rolled. Such definitions are then used to emulate die-rolls or make probability calculations. We describe two different semantics for Roll: One that corresponds to randomly rolling the dice and one for calculating the probability distribution. We discuss implementation issues regarding the latter.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Staff Solutions to Problem Set 9

Problem 1. Suppose you have seven dice—each a different color of the rainbow; otherwise the dice are standard, with faces numbered 1 to 6. A roll is a sequence specifying a value for each die in rainbow (ROYGBIV) order. For example, one roll is .3; 1; 6; 1; 4; 5; 2/ indicating that the red die showed a 3, the orange die showed 1, the yellow 6,. . . . For the problems below, describe a bijection...

متن کامل

The Effect of Header Geometry on Temperature Distribution in Cold Rolling

The objectives in the cold rolling process include improved sheet surface quality, enhanced steel mechanical strength, and better solidification operations. Given the increasing demand for higher steel...

متن کامل

Saving fractional bits: A practical entropy efficient code for fair die rolls

We give an implementation of an algorithm that uses fair coin flips to simulate fair rolls of an n-sided die. A register plays the role of an entropy pool and holds entropy that is generated as a by-product during each die roll and that is usually discarded. The entropy stored in this register is completely reused during the next rolls. Consequently, we can achieve an almost negligible loss of ...

متن کامل

Justified ethicality: Observing desired counterfactuals modifies ethical perceptions and behavior

Employing a die-under-cup paradigm, we study the extent to which people lie when it is transparently clear they cannot be caught. We asked participants to report the outcome of a private die roll and gain money according to their reports. Results suggest that the degree of lying depends on the extent to which self-justifications are available. Specifically, when people are allowed to roll the d...

متن کامل

The prevalence of paradoxicaldice

“Common sense”might seem to indicate that if two fair dice are rolled against each other repeatedly, then over the long term the result will be predicted by their average rolls. We observe that dice which satisfy this “common sense”prediction are actually rather rare. In September of 2003 Peter Winkler (the Director of Fundamental Mathematics Research at Bell Labs) came to Lafayette College, wh...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003